<!DOCTYPE html>

<html>
    <head>
        <title>#{get 'title' /}</title>
        <meta charset="${_response_encoding}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/form_modal.css'}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/upload_img.css'}">
        <!-- itv all + itv displ -->
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/itv_all_request.css'}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/button.css'}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/animate-custom.css'}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/bootstrap.css'}">
        <!-- Font -->
        <link href='http://fonts.googleapis.com/css?family=Life+Savers' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" type='text/css' href="http://fonts.googleapis.com/css?family=Reenie+Beanie:regular">
        <link href='http://fonts.googleapis.com/css?family=Molle:400italic' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Marck+Script' rel='stylesheet' type='text/css'>
        <!-- <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/bootstrap-responsive.css'}"> -->
        #{get 'moreStyles' /}
        <link rel="shortcut icon" type="image/png" href="@{'/public/images/logo.png'}">
        <script src="@{'/public/javascripts/jquery-1.6.4.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        <script src="@{'/public/javascripts/sliding.form.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        <script src="@{'/public/javascripts/jquery.filedrop.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        <script src="@{'/public/javascripts/script.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        <script src="@{'/public/javascripts/bootstrap.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        <script src="@{'/public/javascripts/search.js'}" type="text/javascript" charset="${_response_encoding}"></script>
        #{get 'moreScripts' /}
    </head>
    <script>
    	$(function(){
    		$('#linkEvaluate').click(function(){
    			slidingForm("formCreateEvl","stepsFormEvl","stepEvl","navigationEvl","registerFormCreateEvl");
    		});
    		$('#linkModifyProfil').click(function(){
    			slidingForm("formModifyUser","stepsFormUsr","stepUsr","navigationUsr","registerFormModifyUsr");
    		});
    		$('#linkCreateIntervention').click(function(){
    			slidingForm("formCreateInt","stepsFormItv","stepItv","navigationItv","registerformCreateInt");
    		});
    		$('#linkImportIntervention').click(function(){
    			slidingForm("formImportInt","stepsFormImportItv","stepImportItv","navigationImportItv","registerformImportInt");
    		});
    		$('#linkModifyIntervention').click(function(){
    			slidingForm("formModifyInt","stepsFormItvMod","stepItvMod","navigationItvMod","registerformModifyInt");
    		});
    	});
    </script>
    <body>
    	<div id="nav" class="navbar">
           	#{if session['user_id'] == null}
           	<ul class="nav">
    			<li class="has-submenu"><a href="/admin">Admin</a></li> 
    			</ul>
    		#{/if}   
    		#{if session['user_id'] != null}
            <ul class="nav">       
      
                <li class="has-submenu"><a href=""><img src="@{Interventions.image(session['user_id'])}"/>Mon profil</a></li>
                <li class="btn-drop-menu dropdown">
                	<a class="bottom dropdown-toggle" data-toggle="dropdown" href="#"><span></span></a>
                	 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel">
						<li><a href="/Profil/${session['user_id']}/${session['user_lastname']}">Voir mon profil</a></li>
                		<li><a id="linkModifyProfil" href="#modal-modify" data-toggle="modal">Modifier mon profil</a></li>
					</ul>
                </li>
                    
           	    <li class="has-submenu"><a>Mes cours</a></li>  
           	    <li class="btn-drop-menu dropdown">
           	    	<a class="bottom dropdown-toggle" data-toggle="dropdown" href="#"><span></span></a>
           	    	<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel">
						<li><a href="/Intervention/Mes_cours">Voir la liste des cours</a></li>
						#{if session["user_statut"] == "Enseignant"}
							<li><a id="linkCreateIntervention" href="#modal-create" data-toggle="modal">Ajouter un cours</a></li>
<!-- 							<li><a id="linkImportIntervention" href="#modal-import-itv" data-toggle="modal">Import massif cours</a></li> --> 
							<li><a href="@{Interventions.itv_import_request()}">Import massif cours</a></li>
                			#{if interventionToDisplay != null}
                				<li><a id="linkModifyIntervention" href="#modal-modify-itv" data-toggle="modal">Modifier ce cours</a></li>
                			#{/if}
                		#{/if}
                		#{else}
                			#{if interventionToDisplay != null}

	                				<li><a id="linkEvaluate" href="#modal-evaluate" data-toggle="modal">Evaluer ce cours</a></li>
	                			
                			#{/if}
                		#{/else}
					</ul>
           	    </li>            
                <li><a href="@{Application.statistiques()}">Statistiques</a></li>
                <li><a href="@{Application.deconnectUser()}">D&eacute;connexion</a></li>
                
                <!-- <li><a>Link 5</a></li>
                <li><a>Link 6</a></li> -->
                <li class="search">
					<input type="text" class="search" id="searchbox"/><input class="searchbutton" type="submit" value=""/>
					<ul id="display" class="dropdown-menu pull-right" role="menu" aria-labelledby="searchbox" ></ul>
				</li>
            </ul>
            #{/if}
        </div>
    	<div class="container">
    		<header>
			 	<img id="logo" src="@{'/public/images/logo.png'}"><h1>Note Ton Prof !</h1>
			</header>
			#{doLayout /}
			#{if session["user_statut"] != null}
			<div id="modal-modify" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabe" aria-hidden="true">
		    	#{include 'usr_form_request.html'/}
		    </div>
		    #{/if}
		    
		    #{if session["user_statut"] == "Enseignant"}
			<div id="modal-create" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		    	#{include 'itv_form_request.html'/}
		    </div>
		    <div id="modal-import-itv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		    	#{include 'itv_form_import_request.html'/}
		    </div>
		   	<div id="modal-modify-itv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		    	#{if interventionToDisplay != null } #{include 'itv_form_modify_request.html'/} #{/if}
		    </div>
		    #{/if}
        </div>
    </body>
</html>
